www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\admincp\D_del_class.asp

    <%


'**************************************************************
' 新动软网站管理系统
' 官方网站: http://www.aspcpu.com
' 系统作者: 阮丁远(网名:天下程序)
' Copyright 新动软网站管理系统 版权所有
'**************************************************************


%>





<LINK href="../css.css" type=text/css rel=stylesheet>
<%

dir_set="../../"


%>


<!--#include file=../../inc/conn.asp-->
<!--#include file=../../inc/Functionb.asp-->

<!--#include file=../../inc/ajaxLIB.asp-->

<!--#include file=../inc/checkadmin2.asp-->



<!--#include file=inc_lanmu_bl.asp-->



<!--#include file=../../inc/ND_class_function.asp-->
<!--#include file="../adminHTML/makehtm_inc/D_makehtml_class.asp"-->
<!--#include file=../D_delahtm.asp-->



<%
AJAXshowLoader()


%>



	<%
biao="[ND_prod_class]"
biao2="[ND_prod]"
sys_content_type=trim(request("sys_content_type"))




set rs44g=server.CreateObject("adodb.recordset")
rs44g.open "select * from ND_channel where sys_content_type_name='"&sys_content_type&"' and lanmu_type='"&lanmu_taba&"'",conn,1,1




'------------------------del htm1
is_cmsa=1
is_qiye=0
if cstr(rs44g("is_qiye"))="1" then
is_cmsa=0
is_qiye=1
end if
'------------------------del htm1







if find_dataw(lanmu_taba,rs44g("id"),4)<>"1" and qx_if_max=0 then
response.redirect "../D_suodinguser.asp"
end if





%>

<%
err1=0
set rs44=server.CreateObject("adodb.recordset")
rs44.open "select * from "&biao&" where parent_id_list like '%,"&request("id")&",%' or parent_id='"&request("id")&"'",conn,1,1
if not rs44.eof then




err1=1
%>
<script language="javascript">
alert("该分类下有子分类,请先删除子分类");
history.go(-1);

</script>



<%




end if
%>


<% if err1=0 then


conn.execute("delete from "&biao&" where id="&request("id"))




'---------1
biao="[ND_prod_class]"
biao2="[ND_prod]"
set rs111=server.CreateObject("adodb.recordset")
rs111.open "select * from  "&biao2&" where classid='"&request("id")&"'",conn,1,1
do while not rs111.eof

call delahtmx(rs111("id"),"$page$cp_view_page$")

rs111.movenext
loop

biao="[ND_prod_class]"
biao2="[ND_prod]"
'-------1




conn.execute("delete from "&biao2&" where classid='"&request("id")&"'")

%>

<script language="javascript">
alert("删除成功");
self.location="D_admin_Article_class.asp?sys_content_type=<%=sys_content_type%>";

</script>

<%




end if
%>



<%

AJAXcloseLoader()
%>